package com.talktalk.servlet;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.Socket;
import java.util.Map;

import javax.xml.bind.Marshaller.Listener;

import com.talktalk.entity.Session;
import com.talktalk.thread.ServerListenThread;

public abstract class BaseServlet {
	
	private Session session;
	private ServerListenThread socketPool;
	private Socket socket;

	public void setSession(Session session){
		this.session = session;
	}
	
	public Session getSession(){
		return session;
	}
	
	public ServerListenThread getSocketPool(){
		return socketPool;
	}
	
	public void setSocketPool(ServerListenThread socketPool) {
		this.socketPool = socketPool;
	}
	
	public void setSocket(Socket socket){
		this.socket = socket;
	}
	
	public Socket getSocket(){
		return socket;
	}
	
	
	public abstract void login(ObjectInputStream input, ObjectOutputStream output) throws IOException;
	
	public abstract void logout(ObjectInputStream input, ObjectOutputStream output);
	
	public abstract void forward(ObjectInputStream input, ObjectOutputStream output) throws IOException;
	
}
